package com.hunter.api.help.result;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import org.springframework.stereotype.Component;

/**
 * @author HunterHuang
 * @version 1.0
 * @ClassName SuccessHelp
 * @date 2019/6/1 16:11
 */
@Component
public class SuccessHelp {

    static final String code="20000";
    String msg;
    Object data;
    public SuccessHelp(String msg,Object data){
        this.msg=msg;
        this.data=data;
    }

    public JSONObject getResult(){
        JSONObject json = new JSONObject();
        json.put("code",code);
        json.put("msg",msg);
        json.put("data",data);
        return json;
    }

}


